package com.gem.day08.factory;

/**
 * 本类用来演示工厂方法模式
 */
public abstract class CoffeeFactory {

	public abstract Coffee[] createCoffees();

}

//中国咖啡厂
class ChinaCoffeeFactory extends CoffeeFactory {
	@Override
	public Coffee[] createCoffees() {
		//可以生产卡布奇诺和拿铁
		return new Coffee[] { new Cappuccino(), new Latte() };
	}
}

//美国咖啡厂
class AmericaCoffeeFactory extends CoffeeFactory {
	@Override
	public Coffee[] createCoffees() {
		//可以生产美式咖啡和拿铁
		return new Coffee[] { new Americano(), new Latte() };
	}
}
